home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / gnu / gnpltsrc.lha / stdfn.h < prev    next >
C/C++ Source or Header  |  1996-01-22  |  2KB  |  96 lines

  1. /*
  2.  * $Id: stdfn.h,v 1.13 1995/12/07 21:41:11 drd Exp $
  3.  *
  4.  */
  5.  
  6. /* get prototypes or declarations for string and stdlib functions and deal
  7.    with missing functions like strchr. */
  8.  
  9. /* we will assume the ANSI/Posix/whatever situation as default.
  10.    the header file is called string.h and the index functions are called
  11.    strchr, strrchr. Exceptions have to be listed explicitly */
  12.  
  13. #ifndef STDFN_H
  14. #define STDFN_H
  15.  
  16. #include <stdio.h>
  17. #include <setjmp.h>
  18.  
  19. #ifdef sequent
  20. #define NO_STRCHR
  21. #endif
  22.  
  23. #ifndef NO_STRING_H
  24. #include <string.h>
  25. #else
  26. #include <strings.h>
  27. #endif
  28.  
  29. #ifdef NO_STRCHR
  30. #ifdef strchr
  31. #undef strchr
  32. #endif
  33. #define strchr index
  34. #ifdef strrchr
  35. #undef strrchr
  36. #endif
  37. #define strrchr rindex
  38. #endif
  39.  
  40. #ifdef NO_STDLIB_H
  41. char *malloc();
  42. char *realloc();
  43. char *getenv();
  44. int system();
  45. double atof();
  46. int atoi();
  47. long atol();
  48. double strtod();
  49. #else
  50. #include <stdlib.h>
  51. #endif
  52.  
  53. #ifdef HAVE_UNISTD_H
  54. #include <unistd.h>
  55. #else
  56. #ifdef HAVE_LIBC_H /* NeXT uses libc instead of unistd */
  57. #include <libc.h>
  58. #endif
  59. #endif
  60.  
  61. #ifndef NO_ERRNO_H
  62. #include <errno.h>
  63. #endif
  64. #ifdef EXTERN_ERRNO
  65. extern int errno;
  66. #endif
  67.  
  68. #ifndef NO_SYS_TYPES_H
  69. #include <sys/types.h>
  70. #endif
  71.  
  72. #ifndef NO_LIMITS_H
  73. #include <limits.h>
  74. #else
  75. #ifdef HAVE_VALUES_H
  76. #include <values.h>
  77. #endif
  78. #endif
  79.  
  80. #if defined(DJGPP)||defined(sun386)
  81. #define time_t unsigned long
  82. #endif
  83.  
  84. #include <time.h> /* ctime etc, should also define time_t and struct tm */
  85.  
  86. #if defined(PIPES) && (defined(VMS) || (defined(OSK) && defined(_ANSI_EXT))) || defined(PIPES) && defined(AMIGA_SC_6_1)
  87. FILE *popen(char *cmd, char *mode);
  88. int pclose(FILE *pipe);
  89. #endif
  90.  
  91. #ifdef HAVE_LOCALE
  92. #include <locale.h>
  93. #endif
  94.  
  95. #endif /* STDFN_H */
  96.